home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4295 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.7 KB

  1. Path: news.mindlink.net!news
  2. From: genew@mindlink.bc.ca (Gene Wirchenko)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: HELP!! BAMBOOZLED BEGINNER!!
  5. Date: Sat, 03 Feb 1996 06:50:19 GMT
  6. Organization: MIND LINK! - British Columbia, Canada
  7. Message-ID: <4ev0n2$jeq@fountain.mindlink.net>
  8. References: <Pine.OSF.3.91l.960130235948.20497A-100000@saul3.u.washington.edu> <4eru59$s8t@gryphon.phoenix.net> <TANMOY.96Feb2114543@qcd.lanl.gov> <4etv35$nvf@gryphon.phoenix.net>
  9. NNTP-Posting-Host: line070.nwm.mindlink.net
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. brucew@phoenix.net (Bruce Wedding) wrote:
  13.  
  14. >>   change this to scanf("%U", &i);
  15. >>
  16. >>What is %U? Did you mean %lu?
  17.  
  18. >Well, that is what I had originally.  In my quest to make sure it
  19. >was correct, I mistakenly assumed that Borland wouldn't add
  20. >extensions to an ANSI function.  :(
  21.  
  22. >>    scanned = scanf("%U*%c", &power);
  23.  
  24. >> Did you mean %*c by any chance?
  25.  
  26. >Indeed I did Tanmoy.  Good eye.  You know, sometimes I wish this
  27. >undefined behavior resulted in the catastrophies that it is
  28. >always claimed to.  Then this code would have never been posted
  29. >incorrectly.
  30.  
  31.      It isn't claimed that it does happen, just that it could.  Ah, I
  32. can see it now in alpha testing:
  33.  
  34. test(6): Fatal error: expression x=x++ has undefined behavior - hard
  35. disk has already been reformatted.  You do have a current backup,
  36. don't you?
  37.  
  38. >Bruce D. Wedding                        Have Compiler, Will Travel!
  39. >              Perspicacious Programming Performed Promptly
  40. and Perfectly [If you want to keep your hard disk <G>]
  41. >Katy, Texas, USA, Planet Earth, Milkyway Galaxy, Known Universe
  42.  
  43. Sincerely,
  44.  
  45. Gene Wirchenko
  46.  
  47. C Pronunciation Guide:
  48.      y=x++;     "wye equals ex plus plus semicolon"
  49.      x=x++;     "ex equals ex doublecross semicolon"
  50.  
  51.